package com.lmds.sprindemo1.bean.life;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * Created with IntelliJ IDEA.
 * User: mgm
 * Date: 2019-07-24
 * Time: 11:45
 */

@Component
public class LifeAnnotationTestBean {

    public LifeAnnotationTestBean() {
        super();
        System.out.println("LifeAnnotationTestBean create ...");
    }


    @PostConstruct
    public void init(){
        System.out.println("LifeAnnotationTestBean init ...");
    }


    @PreDestroy
    public void destory(){
        System.out.println("LifeAnnotationTestBean destory");
    }
}
